package mcweb.model.dao;

import java.sql.SQLException;
import java.util.List;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

public class ZipCodeDAOImpl implements IZipCodeDAO {

	private SqlMapClientTemplate client;
	
	public void setSqlMapClientTemplate(SqlMapClientTemplate client){
		this.client = client;
	}

	@Override
	public List selectZipCode(String dong) throws SQLException {
		System.out.println("dao@@@@"+dong);
		List list=client.queryForList("zipCode.selectZipCode",dong);
		System.out.println("#####dao####"+list.size());
		return list;
	}

	@Override
	public int selectZipCodeCount(String dong) throws SQLException {
		
		return (Integer) client.queryForObject("zipCode.selectCount",dong);
	}
	
	
}
